package com.ruoyi.whzj.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.whzj.mapper.WhUserwithdrawMapper;
import com.ruoyi.whzj.domain.WhUserwithdraw;
import com.ruoyi.whzj.service.IWhUserwithdrawService;
import com.ruoyi.common.core.text.Convert;

/**
 * 用户提现记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2020-10-30
 */
@Service
public class WhUserwithdrawServiceImpl implements IWhUserwithdrawService 
{
    @Autowired
    private WhUserwithdrawMapper whUserwithdrawMapper;

    /**
     * 查询用户提现记录
     * 
     * @param id 用户提现记录ID
     * @return 用户提现记录
     */
    @Override
    public WhUserwithdraw selectWhUserwithdrawById(String id)
    {
        return whUserwithdrawMapper.selectWhUserwithdrawById(id);
    }

    /**
     * 查询用户提现记录列表
     * 
     * @param whUserwithdraw 用户提现记录
     * @return 用户提现记录
     */
    @Override
    public List<WhUserwithdraw> selectWhUserwithdrawList(WhUserwithdraw whUserwithdraw)
    {
        return whUserwithdrawMapper.selectWhUserwithdrawList(whUserwithdraw);
    }

    /**
     * 新增用户提现记录
     * 
     * @param whUserwithdraw 用户提现记录
     * @return 结果
     */
    @Override
    public int insertWhUserwithdraw(WhUserwithdraw whUserwithdraw)
    {
        whUserwithdraw.setCreateTime(DateUtils.getNowDate());
        return whUserwithdrawMapper.insertWhUserwithdraw(whUserwithdraw);
    }

    /**
     * 修改用户提现记录
     * 
     * @param whUserwithdraw 用户提现记录
     * @return 结果
     */
    @Override
    public int updateWhUserwithdraw(WhUserwithdraw whUserwithdraw)
    {
        whUserwithdraw.setUpdateTime(DateUtils.getNowDate());
        return whUserwithdrawMapper.updateWhUserwithdraw(whUserwithdraw);
    }

    /**
     * 删除用户提现记录对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteWhUserwithdrawByIds(String ids)
    {
        return whUserwithdrawMapper.deleteWhUserwithdrawByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除用户提现记录信息
     * 
     * @param id 用户提现记录ID
     * @return 结果
     */
    @Override
    public int deleteWhUserwithdrawById(String id)
    {
        return whUserwithdrawMapper.deleteWhUserwithdrawById(id);
    }
}
